package com.volkanic.views.menu;

import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.volkanic.controller.GameController;
import com.volkanic.views.View;
import com.volkanic.views.menu.stages.BackGroundStage;
import com.volkanic.views.menu.stages.ButtonStage;
import com.volkanic.views.stages.WallpaperStage;

import java.util.ArrayList;
import java.util.Collections;

/**
 * Created by Lucas on 22/07/2014.
 */
public class MenuView extends View {

    /**
     * Create a new instance of the class MenuView
     * @param controller The controller of the game
     */
    public MenuView(GameController controller){
        super(controller, GameController.StageState.MENU);

    }

    @Override
    public void show() {
        _listStages = Collections.synchronizedList(new ArrayList<Stage>());

        synchronized (_listStages){
            _listStages.add(new WallpaperStage("textures/night-sky.png"));
            _listStages.add(new BackGroundStage());
            _listStages.add(new ButtonStage(_controller));
        }

        _batch = new SpriteBatch();
    }
}
